<template>
  <el-dialog :title="title" :visible.sync="showInfo" class="info-dialog" width="80%">
    <div class="time-main">
      <div class="time-day" v-for="(item,index) in timeList" :key="item.Id">
        <div class="title-time clearfix">
          <div class="time-left bg-blue" :class="{'time-first':index===0}">
            <span>{{item.OperateTime}}</span>
          </div>
          <div class="time-right">
            <p>{{item.SubLogCatName}}
            <span>操作人：{{item.OperatorName}}</span>  </p>
            <pre v-html="item.OperateContent"></pre>
          </div>
        </div>
      </div>
      <div class="title-end"></div>
    </div>
    <span slot="footer" class="dialog-footer"></span>
  </el-dialog>
</template>
<script>
  export default {
    props:['formData','title'],
    data() {
      return {
        showInfo:false,
        timeList:[],
      }
    },
    created() {
    },
    methods: {
      notice(){
        this.timeList=[];
        this.$ajax.GetOrderLog(this.formData)
        .then((res)=>{
          if(res.Success){
            this.timeList=res.Data;
          }
        })
      },
      toggleDiolag(){
        this.showInfo=!this.showInfo;
        if(this.showInfo){
          this.notice();
        }
      }
    }
  }

</script>
<style lang="scss">
.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
.info-dialog .el-dialog__body{
  padding:0 20px;
}
.time-main{
  overflow: hidden;
}
.time-left{
  width: 15%;
  text-align: right;
  margin-top: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  z-index: 2;
}
.time-first:before{
  content: '';
  height: 15px;
  position: absolute;
  right:-1px;
  background: #fff;
  width: 1px;
}
.time-left,.time-right{
  float: left;
  position: relative;
  line-height: 40px;
}
.time-right{
  width: 80%;
  padding: 0 20px;
  margin-top: 20px;
  &:before{
    content: '';
    height: 150%;
    position: absolute;
    left: 0px;
    background: #409eff;
    width: 1px;
  }
  z-index: 1;
  box-shadow: 3px 3px 3px 0px #409eff5e;
  p:first-child{
    color:#000;
    span{
      float: right;
    }
  }
}
.title-day{
  overflow: hidden;
  color: #ef7c29;
  font-size: 16px;
  font-weight: bold;
}
.title-day .time-left:after{
  border: solid transparent;
  content: ' ';
  height: 20px;
  right: -12px;
  top:9px;
  position: absolute;
  width: 20px;
  border-radius: 20px;
  background: #fff;
  border: 2px solid #ef7c29;
}
.title-time .time-left:after{
  content: ' ';
  height: 10px;
  right: -6px;
  top: 14px;
  position: absolute;
  width: 10px;
  border-radius: 10px;
  background: #ef7c29;
  border: 1px solid #ef7c29;
}
.title-time .bg-blue.time-left:after{
  background: #409EFF;
  border: 1px solid #409EFF;
}
.title-end{
  width: 15%;
  left:1px;
  text-align: right;
  border-right:1px solid #409EFF;
  padding-right: 20px;
  margin-right: 20px;
  box-sizing: border-box;
  height: 30px;
  position: relative;
}

.title-end:after, .title-end:before {
  border: solid transparent;
  content: ' ';
  height: 0;
  right: -11px;
  position: absolute;
  width: 0;
}
.title-end:after {
  border-width: 10px;
  border-top-color: #409EFF;
  top: 20px;
}
</style>
